home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1994 December
/
PSL Monthly Shareware CD-ROM (Public Software Library)(December 1994).bin
/
prgmming
/
dos
/
asm
/
assemble.mac
< prev
next >
Wrap
Text File
|
1984-08-27
|
36KB
|
563 lines
type assemb.mac
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; ASSEMBLE.MAC ;;
;; ;;
;; Sample macro library for the IBM PC Macro Assembler ;;
;; ;;
;; (C) Copyright 1983 ;;
;; by ;;
;; Jerry D. Stuckle ;;
;; ;;
;; Released to Public Domain ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Clear Macro R1,R2,R3,R4,R5,R6,R7,R8
;;***************************************************************************;;
;; ;;
;; Macro: Clear ;;
;; ;;
;; Description: Clear registers ;;
;; ;;
;; Paramaters: Up to 8 registers to be cleared ;;
;; ;;
;; Input: N/A ;;
;; ;;
;; Output: Requested registers set to binary 0's ;;
;; ;;
;; Registers Used: None ;;
;; ;;
;;***************************************************************************;;
Irp Rx,<R1,R2,R3,R4,R5,R6,R7,R8> ;Register list
Ifnb <Rx> ;For each register in list
Xor Rx,Rx ;Clear the register
Endif ;End of Ifidn
Endm ;End of Irp
Endm ;Macro end
Cls Macro
Local Cls1,Clsd
;;***************************************************************************;;
;; ;;
;; Macro: Cls ;;
;; ;;
;; Description: Clear the display screen ;;
;; ;;
;; Paramaters: None ;;
;; ;;
;; Input: None ;;
;; ;;
;; Output: None ;;
;; ;;
;; Registers Used: AX,DX ;;
;; ;;
;;***************************************************************************;;
Display Clsd ;Display the Dos2 String
Jmp Short Cls1 ;Go around the string data
Clsd Db 1bh,'[2J$' ;Data for Dos Call
Cls1 Label Near
Endm
Color Macro Foreground,Background
Local Cold,Col1
;;***************************************************************************;;
;; ;;
;; Macro: Color ;;
;; ;;
;; Description: Sets display color ;;
;; ;;
;; Paramaters: Foreground Color, Background Color ;;
;; ;;
;; Input: None ;;
;; ;;
;; Output: None ;;
;; ;;
;; Registers Used: AX,DX ;;
;; ;;
;;***************************************************************************;;
Display Cold ;Display the color string
Jmp Short Col1 ;Go around the string
Cold Db 1bh,'[' ;Start of string
Ifidn <Foreground>,<Normal> ;If normal request
Db '0' ;Normal Foreground
Else
Ifidn <Foreground>,<Bold> ;If Bold Request
Db '1' ;Bold Foreground
Else
Ifidn <Foreground>,<Underscore> ;If Underscored
Db '4' ;Underscore Foreground
Else
Ifidn <Foreground>,<Blink> ;If Blink request
Db '5' ;Blink Foreground
Else
Ifidn <Foreground>,<Reverse> ;If Reverse request
Db '7' ;Reverse Video
Else
Ifidn <Foreground>,<Invisible> ;If Invisable Request
Db '8' ;Invisable (No-Show)
Else
Ifidn <Foreground>,<Black> ;If Black Request
Db '30' ;Black Foreground
Else
Ifidn <Foreground>,<Red> ;If Red Request
Db '31' ;Red Foreground
Else
Ifidn <Foreground>,<Green> ;If Green Request
Db '32' ;Green Foreground
Else
Ifidn <Foreground>,<Yellow> ;If Yellow Request
Db '33' ;Yellow Foreground
Else
Ifidn <Foreground>,<Blue> ;If Blue Request
Db '34' ;Blue Foreground
Else
Ifidn <Foreground>,<Magenta> ;If Magenta Request
Db '35' ;Magenta Foreground
Else
Ifidn <Foreground>,<Cyan> ;If Cyan Request
Db '36' ;Cyan Foreground
Else
Ifidn <Foreground>,<White> ;If White Request
Db '37' ;White Foreground
Endif
Endif
Endif
Endif
Endif
Endif
Endif
Endif
Endif
Endif
Endif
Endif
Endif
Endif
Ifnb <Foreground> ;If we have foreground...
Ifnb <Background> ;And background colors
Db ';'